package com.kancy.swing.plugin.substance;

import org.pushingpixels.substance.api.skin.SubstanceGraphiteLookAndFeel;

import javax.swing.*;

/**
 * Substance
 *
 * @author kancy
 * @date 2020/2/16 20:26
 */
public class Substance {

    /**
     *调用这个方法就可以改变皮肤
     *JFrame.setDefaultLookAndFeelDecorated(true);放在最前面可以改变框体
     */
    public static void setJavaSkin(){
        try {
            JFrame.setDefaultLookAndFeelDecorated(true);
            JDialog.setDefaultLookAndFeelDecorated(true);
            //设置外观
            UIManager.setLookAndFeel(new SubstanceGraphiteLookAndFeel());
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
